Bamboo HR Employee Search
Note, that the pagination is not supported. It is the limitation of the Bamboo HR API.
import { BreadOperationName } from '@easybread/operations';
import type { PersonSchema } from '@easybread/schemas';
export async function adapterBambooHrEmployeeSearch(
breadId: string,
query: string
): Promise<PersonSchema[]> {
const results = await client.invoke(BreadOperationName.EMPLOYEE_SEARCH, {
breadId,
params: { query },
pagination: { type: 'DISABLED' },
});
if (results.rawPayload.success === false) {
throw new Error('Bamboo HR Employee Search Failed', {
cause: results.rawPayload
});
}
return results.payload;
}